﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Tulde.WindowsPhone.Music.ViewModel;

namespace Tulde.WindowsPhone.Music.Mp3Tunes
{
    public enum LockerDataOperations
    {
        accountData,
        lockerSearch,
        lockerFileExists,
        lockerStats,
        lockerData,
        albumartget
    }
    public enum Bitrate
    {
        b28000 = 28000, 
        b56000 = 56000,
        b96000 = 96000, 
        b128000 = 128000,  
        b192000 = 192000
    }
    public class LockerDataService<T> : BaseDataService<LockerDataOperations> 
    {
        protected override object DeserializeResult(string result)
        {
            if (!string.IsNullOrEmpty(result))
                return ViewModelSerializerFactory.Instance.Deserialize<T>(result);
            else
            {
                return Activator.CreateInstance<T>();
            }
        }
        protected override string BaseUrl
        {
            get
            {
                return "http://ws.mp3tunes.com/api/v1/";
            }
        }
    }
}
